package com.sc.nft.req.profittemplate;

import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author JYT
 * @create 2024/5/10 15:50
 */
@Data
public class ProfitTemplateGetProfitAndPointsReq {
    /**
     * 活动id
     */
    @NotNull(message = "活动id不能为空")
    private Long mallActivityId;
    /**
     * 商品利润
     */
    @NotNull(message = "商品利润不能为空")
    private BigDecimal goodsProfit;

    /**
     * 商品金额
     */
    @NotNull(message = "商品实付金额")
    private BigDecimal orderPrice;

    public static ProfitTemplateGetProfitAndPointsReq build(Long mallActivityId, BigDecimal goodsProfit, BigDecimal orderPrice){
        ProfitTemplateGetProfitAndPointsReq req = new ProfitTemplateGetProfitAndPointsReq();
        req.setMallActivityId(mallActivityId);
        req.setGoodsProfit(goodsProfit);
        req.setOrderPrice(orderPrice);
        return req;
    }

}
